#ifndef VIDEOCAPTURE_H_
#define VIDEOCAPTURE_H_

#include <memory>
#include <string>

#include "hthread.h"
#include "XDemux.h"
#include "HFFDecodeThread.h"

class VideoCapture : public HThread
{
public:
    VideoCapture(const VideoCapture&) = delete;
    VideoCapture& operator=(const VideoCapture&) = delete;

    VideoCapture(std::string streamUrl);

    ~VideoCapture();

    virtual bool doPrepare();
    virtual void doTask();
    virtual bool doFinish();

private:
    std::shared_ptr<XDemux> m_demux = nullptr;
    std::shared_ptr<HFFDecodeThread> m_HFFDecodeThread = nullptr;

    std::string m_streamUrl;

};


#endif